﻿function loadStart(modifylength) {

    var client_height = $(window).height();

    var client_width = $(window).width() / 2;

    var client_scrollTop = Math.max(document.documentElement.scrollTop, document.body.scrollTop);

    if (modifylength != undefined)
        client_height = client_height + modifylength;

    client_height = client_height / 2;

    $("<div id='loading' style='position: absolute; z-index: 1000; top: " + (client_height + client_scrollTop) + "px; left:" + client_width + "px;'> <img src='/Content/jquery/loading/loading.gif' /></div>").appendTo("body");
}

function loadStop() {
    $("#loading").remove();
}